<template>
  <view class="styleGuideDetails">
    <!-- <toast></toast> -->
    <!-- <u-navbar title="财务中心" :bgColor="navbarClass.titleBgColor" @leftClick="backHome" :placeholder="true"> </u-navbar> -->
    <image v-if="options.type == 1" class="image1" src="../../static/image/guideDetails2.png" mode="" />
    <image v-if="options.type == 2" class="image1" src="../../static/image/guideDetails3.png" mode="" />
    <image v-if="options.type == 3" class="image1" src="../../static/image/guideDetails4.png" mode="" />
    <image v-if="options.type == 4" class="image1" src="../../static/image/guideDetails5.png" mode="" />

    <view class="workCont">
      <view class="text1" v-for="(v, i) in dtNewsVoList" :key="i" @click="gotoJump('/pageContent/guide/message', v)">
        <text class="txt2 u-line-1">{{ v.title }}</text>
        <u-icon name="arrow-right" color="#999" size="18"></u-icon>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      options: {},
      dtNewsVoList: [],
    }
  },
  onLoad(options) {
    this.options = options
    if (options.type == 1) {
      this.findArticleList(44)
    } else if (options.type == 2) {
      this.findArticleList(45)
    } else if (options.type == 3) {
      this.findArticleList(46)
    } else if (options.type == 4) {
      this.findArticleList(47)
    }
  },
  methods: {
    findArticleList(str) {
      this.$https
        .post({
          url: '/axh/articleManage/findArticleList',
          data: {
            oneClassifyId: 43,
            twoClassifyId: str,
            threeClassifyId: '',
            fourClassifyId: '',
            page: 1,
            limit: 200,
            title: '',
            status: 1,
            phoneAuth: 1,
          },
        })
        .then((data) => {
          this.dtNewsVoList = data.result.dtNewsVoList
        })
    },

    gotoJump(url, item) {
      if (item.articleType == 2) {
        //#ifdef H5
        location.href = item.content
        //#endif
      } else {
        uni.navigateTo({
          url: `${url}?id=${item.id}`,
        })
      }
    },
  },
}
</script>

<style lang="scss" scoped>
.styleGuideDetails {
  background: #f6f6f6;
  min-height: 100vh;
  .image1 {
    width: 100%;
    height: 200rpx;
    margin-bottom: 12rpx;
  }

  .workCont {
    background: #ffffff;
    padding: 0 24rpx;
    margin-bottom: 24rpx;
  }
  .text1 {
    display: flex;
    justify-content: space-between;
    padding: 24rpx 0;
    color: #333333;
    .txt2 {
      width: 560rpx;
      line-height: 1.7;
    }
  }
}
</style>
